#!/bin/sh
# This regression test is a part of SIPp.
# A keyword's parameters keep a '-' before a digit: [field0 file=a-1.csv]
# names the file a-1.csv, not a with an offset of -1.
. "`dirname "$0"`/../functions"; init

printf 'SEQUENTIAL\nleft;right;\n' >a-1.csv
rm -f uac_*_logs.log
sippfg -sf uac.xml -inf a-1.csv -i 127.0.0.1 -p 25830 -m 1 \
    127.0.0.1:25831 -trace_logs >/dev/null 2>&1
status=$?
logs=`cat uac_*_logs.log 2>/dev/null`
rm -f a-1.csv uac_*_logs.log

if test $status -ne 0; then
    fail "the scenario failed with $status"
elif test "$logs" != "left right"; then
    fail "logged '$logs', not 'left right'"
else
    ok
fi
